<template>
	<view>
		<view class="shopImg"><image :src="product.cover" mode="aspectFill"></image></view>
		<view class="shopTxt">{{ product.title }}</view>
		<view class="shopContent">
			<text>{{ product.content.substring(0, 8)+'...' }}</text>
		</view>
	</view>
</template>

<script>
export default {
	name: 'product-card',
	data() {
		return {};
	},
	props: {
		product: {
			type: Object,
			default: {}
		}
	}
};
</script>

<style lang="less">
.shopImg {
	height: 220rpx;
}

.shopImg image {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 12rpx 12rpx 0 0;
}

.shopTxt {
	font-size: 30rpx;
	color: #141414;
	font-weight: bold;
	padding: 20rpx 20rpx 0 20rpx;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.shopContent {
	padding: 0 20rpx;
}

.shopContent text {
	font-size: 26rpx;
	color: #9d9d9d;
}

.shopMoney text:last-child {
	color: #aaaaaa;
}

.shopLt:nth-child(2n) {
	float: right;
}

.shopLt:active {
	background: #e2e2e2;
}
</style>
